<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no"/>
		<title>代维调度待办列表</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
		<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
		<link rel="stylesheet" type="text/css" href="../../css/common.css"/>
		<link rel="stylesheet" href="../../script/ccssoft/css/ccssoft-lite.css" />
		<link rel="stylesheet" type="text/css" href="../../script/easydialog/easydialog.css" />
		<link rel="stylesheet" href="../../css/lightForBillMenu.css">
		<link rel="stylesheet" href="../../css/darkForBillMenu.css"  disabled>
		<link rel="stylesheet" type="text/css" href="../../css/billMenu.css" />
		<style>
			.aui-flex-col:first-child {
				height: 30px;
				line-height: 30px;
				border-bottom: 1px dashed #00a0c8;
			}
			.aui-flex-col {
				height: 25px;
				line-height: 25px;
			}
			.ccssoft_list {
				background-color: #eff1f0;
				override: hidden;
			}
			.ccssoft_list {
				margin-top: 15px;
			}
			.ccssoft_list li {
				list-style: none;
				border-bottom: 1px solid #e3e2e2;
				background: #fff;
				overflow: hidden;
				margin-bottom: 10px;
			}
			.ccssoft_list li:hover {
				background: #f9e9df;
			}
			.ccssoft_list li.acitve {
				background: #f9e9df;
			}
			.cj-orange{
				background-color: orange;
			}
			.cj-blue{
				background-color: blue;
			}
			.cj-purple{
				background-color: purple;
			}
			.cj-green{
				background-color: green;
			}

			.cj-l-level{
				width: 18px;
				height: 18px;
				border-radius: 50%;
				line-height: 18px;
				text-align: center;
				display: inline-block;
				color: #fff;
				margin: 0 4px;
				vertical-align:top;
			}

			.cj-ash{
				background-color: grey;
			}

			.ccssoft_list_wxx {
			 background-color: #eff1f0;
			 overflow: hidden;
			 width: 94%;
			 margin: 0 auto;
		 }
		 .ccssoft_list_wxx li {
				 list-style: none;
				 border-radius: 6px;
				 padding:3px 10px 3px 10px;
				 background: #fff;
				 overflow: hidden;
				 margin-top: 10px;
		 }
		 /*.ccssoft_list_wxx li:hover {
				 background: #f9e9df;
		 }
		 .ccssoft_list_wxx li.acitve {
				 background: #f9e9df;
		 }*/
		 .ccssoft_list_wxx .showBox{
				 text-align:center;
				 font-size:12px;
		 }
		 #main{
			 background-color: #f4f4f4;
			 padding-top: 10px;
		 }
		 .cj-l-title-wxx{
				 border-bottom: 1px dashed #00a0c8;
				 font-size: 16px;
				 font-weight: bold;
				 line-height: 20px;
				 padding: 8px 70px 8px 0;
				 position: relative;
		 }

		 .cj-l-title-wxx span {
				 display: block;
				 width: 90px;
				 height: 20px;
				 line-height: 20px;
				 color: #666;
				 text-align: right;
				 position: absolute;
				 top: 5px;
				 right: 0;
				 font-size: 12px;
				 font-weight: bold;
		 }
		 .cj-l-into-wxx {
				 font-size: 12px;
				 color: #666;
				 line-height: 20px;
				 padding: 3px 0;
				 position: relative;
		 }
		 .cj-l-date-wxx {
				 display: block;
				 position: absolute;
				 top: 3px;
				 right: 0;
				 width: 180px;
				 text-align: right;
		 }
		 .cj-l-date-wxx span {
				 margin-left: 7px;
		 }
		 .cj-l-date-wxx:after {
				 content: "";
				 display: block;
				 width: 1px;
				 height: 12px;
				 background: #e3e3e3;
				 position: absolute;
				 top: 4px;
				 left: 60px;
		 }
		 .cj-l-date-wxx-2{
			 display: block;;
			 width: 1px;
			 height: 12px;
			 background: #e3e3e3;
			 position: absolute;
			 right: -4px;
			 top:4px;
		 }

		 .cj-l_line{
			 position: absolute;
			 width:5px;
			 height: 18px;
			 left: -10px;
			 top: 9px;
			 border-radius: 10px;
		 }
		 .cj-l_line1{
			 background: linear-gradient(#fe7a7d, #fe4f4f);
		 }
			.LC_img{
				height: 60px;
				display: block;
				margin: 0 auto;
				background-color:#ccc;
			}
			.wxx_btn{
				width: 118px;
				height: 33px;
				border-radius: 35px;
				border: 1px solid #db4537;
				line-height: 30px;
				box-shadow: 0 3px 8px rgba(226,132,123,.5);
				color: #db4537;
				font-size: 14px;
				text-align: center;
				margin: 4px auto;
			}
			.none{
				display: none;
			}
		</style>
	</head>
	<body>
		<script id="listView-template" type="text/x-dot-template">
			{{ for(var i=0, len=it.length; i < len; i++) {

			}}
			<li class="aui-content" style="padding:8px;" tapmode="active">
			 <div class="detailDiv" userName="{{=it[i].user_NAME}}"  userLoginCode="{{=it[i].user_LOGIN_CODE}}">
			<div class="aui-flex-col">
			<div class="aui-flex-item-9" style="font-weight: bold;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">姓名：{{=it[i].user_NAME ? it[i].user_NAME : '&nbsp;'}}</div>
			</div>
			<div class="aui-flex-col" style="font-size:12px;">
			<div class="aui-flex-item-6">省份：{{=it[i].p_ORG_NAME  != null ? it[i].p_ORG_NAME :''}}</div>
			</div>
			<div class="aui-flex-col" style="font-size:12px;">
			<div class="aui-flex-item-6">地市：{{=it[i].c_ORG_NAME != null ? it[i].c_ORG_NAME:''}}</div>
			<div class="aui-flex-item-6 aui-text-right">区域：{{=it[i].c_ORG_NAME != null ? it[i].c_ORG_NAME:''}}</div>
			</div>
			</div>
			<div class='wxx_btn'
			onclick='optTransfer("receiveDiv",this);'>转派</div>
			</li>
			{{ } }}
		</script>

		<div id="wrap" >
			<div id="shadowId" class="shadow none" tapmode="" ></div>
			<div id="header"></div>
			<div id="standBillMenuMain"></div>
		</div>
		<!--领取任务begin-->
		<div id="receiveDiv" class="winDiv">
			<div class="winTitleDiv">
				确定转派任务？
			</div>
			<div  id="transferLabelDivId1" class="selectLabelDiv" style="margin-top: 10px;" >
				<div id="user_name5" style="font-size:16px;color:#adadad;text-align:left; margin-left:23px;">
				</div>
			</div>
			<div class="winButtonDiv">
				<button class="winCancelBtn"  onclick="closeDiv(receiveDiv)">
					取消
				</button>
				<button class="winOkBtn"  onclick="acceptFunc2()">
					确定
				</button>
			</div>
		</div>
		<!--领取任务end-->
		<div class="aui-content">
			<ul class="ccssoft_list_wxx" id="listView"></ul>
		</div>


	</body>
	<script type="text/javascript" src="../../script/jquery-1.11.3.min.js"></script>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/debug.js"></script>
	<script type="text/javascript" src="../../script/constant.js"></script>
	<script type="text/javascript" src="../../script/config.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script type="text/javascript" src="../../script/navigate.js"></script>
	<script type="text/javascript" src="../../script/doT.min.js"></script>
	<script type="text/javascript" src="../../script/ccssoft/js/ccssoft-lite.js"></script>
	<script type="text/javascript" src="../../script/client.api.js"></script>
	<script type="text/javascript" src="../../script/aui-alert.js"></script>
	<script type="text/javascript" src="../../script/GPS.js"></script>
    <script type="text/javascript" src="../../script/request.js"></script>
    <script type="text/javascript" src="../../script/gongdan.js"></script>
	<script type="text/javascript" src="script/standBillMenu.js"></script>
	<script type="text/javascript" src="../../script/easydialog/easydialog.js"></script>



	<script type="text/javascript">
		apiready=function(){//进入该页面时默认获取当前区域可以转派人员的信息
			api.showProgress({
				title : '处理中',
				modal : true,
			});
			console.log(JSON.stringify(api.pageParam));
			var opts={
				// id:'DW-1301-20191224-15771534941',
				id:api.pageParam.id,
				start:0,
				limit:5
			}

			listView = new C.ApiListView({
				fn : $client.getTaskUsers,
				listName : 'getTaskUserList',
				templateId:'#listView-template',
			});
			listView.setQueryOptions({
					id:api.pageParam.id
			})
			listView.refresh();
		}


		function refreshwxx(){
				listView.refresh();
		}

		//关闭弹出DIV对话框
		function closeDiv(divId) { //dingxb点击转派页面的取消时需要执行的方法
			easyDialog.close({
				container : divId
			});
		}

		function acceptFunc2() {//点击转派时需要处理的操作
			var transferData = $api.getStorage('transferData');//获取转派人员信息
			transferData.id=api.pageParam.id;
			console.log(JSON.stringify(transferData));
			api.showProgress({
				title : '处理中',
				modal : true,
			});
			$client.sendTaskTo(transferData, function(ret, err) {
				var data_info=JSON.parse(ret.data_info)
				console.log(JSON.stringify(data_info));
				if (ret) {
						if (data_info.msg.indexOf("成功")>0) {//判断是否转派成功
							closeDiv(receiveDiv);//关闭搜索搜索框
							api.toast({     			//提示信息
									msg: data_info.msg,
									duration: 2000,		//显示时长
									location: 'bottom'//显示位置
							});
							api.hideProgress();
							// window.setTimeout(function() {
							// 	api.closeToWin({
							// 	 name: 'generationTransferWin'
							// 	});
							// }, 1000);
						} else {
								api.hideProgress();
								api.toast({     			//提示信息
										msg: data_info.msg,
										duration: 2000,		//显示时长
										location: 'bottom'//显示位置
								});
						}
				} else {
						api.hideProgress();
						showToast(err.msg);
				}
			})
		}
	</script>
</html>
